package com.kkshop.service;

import java.io.Serializable;
import java.util.List;

import com.kkshop.model.Persistent;

public interface PersistenceService {

    Persistent<? extends Serializable> find(Class<? extends Persistent<? extends Serializable>> clazz, Serializable key) throws Exception;

    List<? extends Persistent<? extends Serializable>> findAll(Class<? extends Persistent<? extends Serializable>> clazz) throws Exception;

    void save(Persistent<? extends Serializable> model) throws Exception;

    void update(Persistent<? extends Serializable> model) throws Exception;

    void delete(Persistent<? extends Serializable> model) throws Exception;

}